Added documentation support to Skyline Tool Store#610
Open
brendanx67 wants to merge 1 commit intorelease25.11-SNAPSHOTfrom
Open
Added documentation support to Skyline Tool Store#610brendanx67 wants to merge 1 commit intorelease25.11-SNAPSHOTfrom
brendanx67 wants to merge 1 commit intorelease25.11-SNAPSHOTfrom
Conversation
* Extract docs from tool-inf/docs/ in uploaded ZIPs and serve via WebDAV * Carry forward docs from previous version when new ZIP has none * Show "Online Documentation" link in Documentation box when docs exist * Skip tool-inf/docs/ images during icon extraction * Exclude docs dir from supplementary file listings * Fall back to /home/support when no tool-specific support board exists Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for tool-provided HTML documentation in the Skyline Tool Store by extracting tool-inf/docs/ from uploaded ZIPs, serving it via WebDAV, and surfacing an “Online Documentation” link on the tool details page. Also improves upload behavior by carrying documentation forward across versions, prevents docs images from being mistaken as the tool icon, hides docs from supplementary listings, and adjusts Support Board fallback behavior.
Changes:
- Extract
tool-inf/docs/into adocs/folder under the tool’s file root and (when missing) copy forward docs from the previous version. - Add “Online Documentation” link in the tool details UI when
docs/index.htmlexists. - Prevent docs content from affecting icon selection and exclude
docsfrom supplementary file listings; add Support Board fallback to/home/support.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
SkylineToolsStore/src/org/labkey/skylinetoolsstore/view/SkylineToolDetails.jsp |
Adds Support Board fallback selection and conditionally displays an “Online Documentation” link. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/model/SkylineTool.java |
Adds helpers to detect docs presence and compute the WebDAV URL to docs/index.html. |
SkylineToolsStore/src/org/labkey/skylinetoolsstore/SkylineToolsStoreController.java |
Skips tool-inf/docs/ during icon discovery, extracts docs from ZIPs (with zip-slip protection), copies docs forward when absent, and excludes docs from supplementary file basenames. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
303
to
+314
| <button id="tool-support-board-btn" class="banner-button-small">Support Board</button> | ||
| <% addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(getContainer().getChild("Support").getChild(tool.getName()))) + ", '_blank', 'noopener,noreferrer')"); %> | ||
| <% | ||
| Container supportContainer = getContainer().getChild("Support"); | ||
| Container toolSupportBoard = supportContainer != null ? supportContainer.getChild(tool.getName()) : null; | ||
| Container supportTarget; | ||
| if (toolSupportBoard != null) | ||
| supportTarget = toolSupportBoard; | ||
| else | ||
| supportTarget = ContainerManager.getForPath("/home/support"); | ||
| if (supportTarget != null) | ||
| addHandler("tool-support-board-btn", "click", "window.open(" + q(urlProvider(ProjectUrls.class).getBeginURL(supportTarget)) + ", '_blank', 'noopener,noreferrer')"); | ||
| %> |
Comment on lines
+347
to
+350
| <% if (tool.hasDocumentation() || suppIter.hasNext()) { %> | ||
| <div id="documentationbox" class="itemsbox"> | ||
| <legend>Documentation</legend> | ||
| <% if (tool.hasDocumentation()) { %> |
| @@ -178,7 +178,8 @@ protected SkylineTool getToolFromZip(MultipartFile zip) throws IOException | |||
| while ((zipEntry = zipStream.getNextEntry()) != null && | |||
| (tool == null || tool.getIcon() == null)) | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool-inf/docs/from uploaded tool ZIPs and serve HTML documentation via WebDAV (/_webdav/.../@files/docs/)docs/index.htmlexiststool-inf/docs/so screenshot PNGs don't replace the tool icondocsdirectory from supplementary file listings/home/supportwhen no tool-specific support board exists, so new tools default to the Skyline support boardTest plan
tool-inf/docs/— docs extracted, "Online Documentation" link appears, renders correctly in new tab/home/supportfor tools without a dedicated support boarddocsdirectoryCo-Authored-By: Claude noreply@anthropic.com